<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
	<meta http-equiv="Content-Language" content="zh-cn">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="${pageContext.request.contextPath}/resources/css/Style.css" type="text/css" rel="stylesheet">
	<script src="${pageContext.request.contextPath}/resources/js/check.js"></script>
</head>
<body>
	<form id="userAction_save_do" name="Form1"
		action="${pageContext.request.contextPath}/AddProductServlet" method="post"
		enctype="multipart/form-data">
		&nbsp;
		<table cellSpacing="1" cellPadding="5" width="100%" align="center"
			style="border: 1px solid #8ba7e3" border="0">
			<tr>
				<td class="ta_01" align="center" bgColor="#afd1f3" colSpan="4"
					height="26"><strong><STRONG>添加商品</STRONG> </strong>
				</td>
			</tr>
			<tr>
				<td align="center" class="ta_01">商品名称：</td>
				<td class="ta_01" >
					<input type="text" name="name" class="bg" id="productName" onblur="CheckNull(this.id,'商品名称')"/>
				</td>
				<td align="center" class="ta_01">商品价格：</td>
				<td class="ta_01" >
					<input type="text" name="price" class="bg" id="price" onblur="CheckMustNum(this.id,'商品价格')"/>
				</td>
			</tr>
			<tr>
				<td align="center" class="ta_01">商品数量：</td>
				<td class="ta_01" >
					<input type="text" name="pnum" class="bg" id="pnum" onblur="CheckMustNum(this.id,'商品数量')"/>
				</td>
				<td align="center" class="ta_01">商品类别：</td>
				<td class="ta_01" >
					<select name="category" id="category" onchange="CheckNull(this.id,'商品类别')">
						<option value="" selected="selected">--选择商品类别--</option>
                        <c:forEach items="${requestScope.cates}" var="cate">
							<option value="${cate.id}">${cate.category}</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td align="center" class="ta_01">商品图片：</td>
				<td class="ta_01" colspan="3">
					<input type="file" name="upload" size="30" value="" />
				</td>
			</tr>
			<tr>
				<td class="ta_01" align="center" >商品描述：</td>
				<td class="ta_01" colSpan="3">
					<textarea name="description" cols="30" rows="3" style="WIDTH: 96%"></textarea>
				</td>
			</tr>
			<tr>
				<td align="center" colSpan="4" class="sep1">
					<img src="${pageContext.request.contextPath}/resources/images/shim.gif">
				</td>
			</tr>
			<tr>
				<td class="ta_01" style="WIDTH: 100%" align="center" colSpan="4">
					<input type="submit" class="button_ok" value="确定">	

					<input type="reset" value="重置" class="button_cancel">					

					<input class="button_ok" type="button" onclick="history.go(-1)" value="返回" />
					<span id="Label1"></span>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>